package com.lipy.configserverstarterused;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Scope("myRefresh")
@RestController
public class TestController {

    @Value("${zk1:1}")
    private String zk1;
    @GetMapping("test")
    public Object test(){
        System.out.println("zk1 = " + zk1);
        return "a"+zk1;
    }
}
